package com.john.design.七大原则.开闭原则;

/**
 * @Author: JohnCoding
 * @Description:
 * @date: 2020/8/9 15:42
 */
public class JavaDiscountCourse extends JavaCourse{

    public JavaDiscountCourse(Integer id, String name, Double price) {
        super(id, name, price);
    }

    public Double getOriginPrice(){
        return super.getPrice();
    }

    @Override
    public Double getPrice() {
        return super.getPrice()*0.8;
    }
}
